import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'marketeq:settings',
      order: 9999,
      title: $t('page.setup.title'),
      authority: ['super'], // 角色码 roles
    },
    name: 'SetUp',
    path: '/setting',
    children: [
      {
        name: 'SysSetUp',
        path: '/setting/global',
        component: () => import('#/views/setup/global/index.vue'),
        meta: {
          icon: 'emojione-v1:globe-showing-asia-australia',
          title: $t('page.setup.global'),
        },
      },
      {
        name: 'EleDemo',
        path: '/setting/demo',
        component: () => import('#/views/setup/demo/index.vue'),
        meta: {
          icon: 'catppuccin:folder-temp',
          title: $t('page.setup.demo'),
        },
      },
    ],
  },
];

export default routes;
